#!/usr/bin/perl
package code;
use strict;

#Encode LC to be 1 and else, if not it is 2 if UC.
sub encode {
    my $code = $_[0];
    my @code = split(//,$code);
    my $return;
    foreach (@code) {
	if ($_ eq lc($_)) {
	    $return .= '1';
	}
	else {
	    $return .= '2';
	}
    }
    return $return;
}
1;
